<!DOCTYPE html>
<html lang="en" version="123">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=100%, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,user-scalable=no">
    <meta name="format-detection" content="telephone=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="https://oss.tuo51.com/public/css/style.css"/>
    <link rel="stylesheet" href="https://oss.tuo51.com/public/css/evalute.css"/>
    <script src="https://teachedu.oss-cn-beijing.aliyuncs.com/public/js/jquery-2.1.1.min.js"></script>
    <script src="https://teachedu.oss-cn-beijing.aliyuncs.com/public/js/vue.min.js"></script>
    <script src="https://teachedu.oss-cn-beijing.aliyuncs.com/public/js/common.js"></script>
    <script src="https://cdn.bootcss.com/echarts/4.1.0/echarts.js"></script>

    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>

    <title>心理行为测评</title>
    <style>
        body{
            margin:0 auto;
            background: #fff;
            color:#666;
            font-size: 0.34rem;
            line-height: 1.8;
            font-family:  'PingFangSC-Regular', 'sans-serif'
        }

        .page_header{
            position: relative;
            padding:40px 0.4rem 0
        }

        .page_header::before,.page_header::after{
            content:'';
            display: block;
            position: absolute;
            background: #fff
        }

        .page_header::before{
            top:0;
            left:0;
            right:0;
            bottom:60%;
        }

        .page_header::after{
            width:100%;
            height:20%;
            border-radius: 200%;
            left:0;
            bottom:50%;
            right:0
        }

        .page_header figure{
            border-radius:10px;
            padding:0.4rem;
            position: relative;
            background: #fff;
            overflow: hidden;
            z-index: 10;
            display: flex;
            flex-direction: row;
            align-items: center;
            box-shadow:1px 0 10px rgba(0,0,0,0.1)
        }

        .img{
            width:58px;
            height:58px;
            border-radius: 50%;
            border:2px solid #d1d1f6;
        }

        .page_header figure::after{
            content:'';
            display: block;
            position: absolute;
            background: #fbf5fd;
            width:156px;
            height:156px;
            border-radius: 50%;
            bottom:-78px;
            right:-78px;
        }

        .page_header figcaption{
            margin-left:10px;
            color:#807fc3
        }

        .page_header figcaption h2{
            font-size: 0.36rem;
            font-weight: bold;
            margin-bottom:5px;
            line-height: 1.5;
            color:#807fc3
        }

        .page_header figcaption h3{
            font-size: 0.32rem;
            font-weight: lighter;
            margin-bottom: 0;
            color:#807fc3
        }

        .echartsBox{
            height:312px;
            margin-top:0.1rem;
        }

        .sec_secondary{
            padding-top: 0.2rem;
            padding-bottom: 0.2rem;
            padding-left: 0.4rem;
            padding-right: 0.4rem;
            background-color: #fff;
            margin-top: 10px;
        }

        .sec_secondary > h2,.sec_secondary > h2 span{
            color:#50576a;
            font-size: 0.32rem;
            font-weight: bold
        }

        .sec_secondary > h2 span{
            margin-right:10px
        }

        .standardTable,.scoreTable{
            width:100%;
            border-radius: 10px;
            overflow: hidden;
            margin-top: 10px
        }

        .scoreTable th,.scoreTable td{
            background: #FACB2F;
            font-size: 0.22rem;
            color:#fff;
            text-align: center;
            padding:8px 0
        }

        .scoreTable td{
            background: #FDEFBF;
            font-size: 0.22rem;
            color:#50576a;
            text-align: center;
            padding:8px 0
        }

        .standardTable td,.standardTable th{
            background: #e4e3fd;
            /* border:1px solid #fff; */
            font-size: 0.22rem;
            color:#50576a;
            text-align: center;
            padding:8px 0
        }

        .standardTable th{
            font-size: 0.26rem;
        }

        .advise{
            background-color: #fff;
            border-radius:0px 0px 8px 8px;
        }

        .advise section{

        }

        .advise h3{
            color:#50576a;
            font-size:0.27rem;
            margin-bottom:8px;
            margin-left:15px
        }

        .advise p{
            color:#50576a;
            font-size:0.24rem;
            margin-left:20px;
            margin-right: 20px;
        }

        .sec_secondary-r{
            padding-top: 0.2rem;
            padding-bottom: 0.2rem;
            padding-left: 0.4rem;
            padding-right: 0.4rem;
        }

        .collapse-item{
            margin-top: 20px;
        }

        .el-collapse-item__header{
            border-radius: 8px;
            background-color: #fff;
            font-size:0.26rem;
            font-weight: bold;
            padding: 6px;
            padding-left: 10px;
            padding-right: 10px;
        }

        .el-collapse-item__header.is-active{
            border-radius:8px 8px 0px 0px;
            background-color: #FFAB00;
            color: #fff;
        }

        .el-collapse-item__wrap{
            border-bottom: 0px;
        }

        .el-collapse-item__content{
            padding-bottom: 0px;
        }

        .el-collapse{
            border-top: 0px;
            border-bottom: 0px;
        }

        .assess-children-view {
            background-color: #FFFFFF;
            padding-top: 20px;
            padding-left: 20px;
            padding-bottom: 20px;
            padding-right: 20px;
            display: flex;
            flex-direction: row;
            font-size: 15px;
            color: #666666;
            align-items: center;
        }

        .children-info-view {
            display: flex;
            flex-direction: column;
            flex-grow: 1;
            margin-left: 20px;
        }

        .children-info-view-row {
            display: flex;
            flex-direction: row;
            margin-top: 10px;
        }

        .info-item {
            flex: 1;
        }

        .bmi-conclusion{
            font-size: 15px;
            color: #666666;
            margin-left: 0.4rem;
            margin-right: 0.4rem;
        }

        .bmi-view{
            background-color: #fff;
            margin-top: 10px;
            padding-top: 0.2rem;
            padding-bottom: 0.2rem;
        }

        /**测评项目详情*/
        .item{
            background-color: #FFFFFF;
            margin-left: 20px;
            margin-right: 20px;
        }

        .item-title-view{
            display: flex;
            flex-direction: row;
            align-items: center;
            margin-top: 15px;
        }

        .item-title-top{
            width:10px;
            height:15px;
            background:rgba(250,203,47,1);
            opacity:1;
        }

        .item-title{
            font-size:15px;
            font-weight:bold;
            color:rgba(34,34,34,1);
            opacity:1;
            margin-left: 5px;
        }

        .content-view{
            display: flex;
            flex-direction: row;
            margin-top: 10px;
            align-items: center;
            justify-content: space-between;

            font-size: 15px;
            color: #333333;
        }

        .item-check-yes{
            width: 18px;
            height: 13px;
        }

        .item-check-no{
            width: 15px;
            height: 15px;
        }

        .suggest--exline{
            border-top:1px dashed rgba(250,203,47,1);
            height: 1px;
            overflow:hidden;
            margin-top: 15px;
        }
        /**测评项目详情*/

        /**发育商图*/
        .scores-item{
            display: flex;
            flex-direction: row;
            color: #50576a;
            font-size: 12px;
            align-items: center;
            margin-top: 5px;
        }

        .scores-item-color{
            width: 15px;
            height: 15px;
        }

        .scores-item-name{
            margin-left: 5px;
            margin-right: 10px;
        }
        /**发育商图*/
    </style>
</head>
<body style="background-color:#F7F7F7">
<div id="app">
    <div >
        <header >
            <div class="assess-children-view">
                <img class="img" src="https://teachedu.oss-cn-beijing.aliyuncs.com/public/images/children-head-male.png"/>
                <div class="children-info-view">
                    <div class="children-info-view-row">
                        <div style="flex: 1.2;">姓名:{{detail.childrenName}}</div>
                        <div class="info-item">月龄:{{detail.month}}</div>
                        <div class="info-item">性别:{{detail.gender===1?'男':'女'}}</div>
                    </div>
                    <div class="children-info-view-row">
                        <div style="flex: 1.2;">身高:{{detail.height}}cm</div>
                        <div class="info-item">体重:{{detail.weight}}kg</div>
                        <div class="info-item"></div>
                    </div>
                    <div></div>
                </div>
            </div>
        </header>


        <section class="bmi-view">
            <div class="echartsBox" id="echartsHeight" style="height:368px"></div>
            <div class="bmi-conclusion">{{detail.bmi.heightConclusion}}</div>
        </section>

        <section class="bmi-view">
            <div class="echartsBox" id="echartsWeight" style="height:368px"></div>
            <div class="bmi-conclusion">{{detail.bmi.weightConclusion}}</div>
        </section>

        <section class="sec_secondary">
            <h2 v-if="detail.dimensionScores"><span>智龄(月):{{detail.scores_it}} </span><span>发育DQ:{{detail.scores_dev}}  </span><span>{{detail.itValStr}}</span></h2>
            <div class="evlAndSug_con">
                <table class="scoreTable" cellspacing="1">
                    <tr>
                        <th style="width:16%">测试能区</th>
                        <th v-for="item in detail.dimensionScores" style="width:14%">{{item.dimensionName}}</th>
                    </tr>
                    <tr>
                        <td style="width:16%">分量表智龄（月）</td>
                        <td v-for="item in detail.dimensionScores" style="width:14%">{{item.score_it}}</td>
                    </tr>
                    <tr>
                        <td style="width:16%">分量表发育商值/指数</td>
                        <td v-for="item in detail.dimensionScores" style="width:14%">{{item.score_dev}}</td>
                    </tr>
                </table>

            </div>
        </section>

        <section class="sec_secondary">
            <div class="echartsBox" id="echartsBox" style="height:368px;"></div>
            <div style="margin-left: 30px;align-self: flex-start;">
                <div class="scores-item">
                    <div style="background-color: #A3F680;" class="scores-item-color"></div>
                    <div class="scores-item-name">超常</div>
                    <div>130分及130分以上</div>
                </div>
                <div class="scores-item">
                    <div style="background-color: #DDFD30;" class="scores-item-color"></div>
                    <div class="scores-item-name">优秀</div>
                    <div>115分——129分</div>
                </div>
                <div class="scores-item">
                    <div style="background-color: #FFFF00;" class="scores-item-color"></div>
                    <div class="scores-item-name">正常</div>
                    <div>85分——114分</div>
                </div>
                <div class="scores-item">
                    <div style="background-color: #FFAB00;" class="scores-item-color"></div>
                    <div class="scores-item-name">落后</div>
                    <div>70分——84分</div>
                </div>
                <div class="scores-item">
                    <div style="background-color: #FF8E00;" class="scores-item-color"></div>
                    <div class="scores-item-name">偏低</div>
                    <div>69分——69分以下</div>
                </div>
            </div>
        </section>

        <section class="sec_secondary">
            评估建议
            <p v-if="detail.normalConclusion">{{detail.normalConclusion}}</p>
			<p v-if="detail.warningConclusion">{{detail.warningConclusion}}</p>
        </section>

        <section  class="sec_secondary-r">
            <el-collapse  accordion value="大动作">

                <el-collapse-item class="collapse-item" v-for="item in detail.highLevelInfo" :name="item.dimensionName" :title="item.dimensionName+'·'+item.month+'月龄'" class="collapse-item" >

                    <div class="advise">
                        <section v-if="item.developmentStatus && item.developmentStatus.length > 0" >
                            <h3>发育里程碑：</h3>
                            <p>{{item.developmentStatus}}</p>
                        </section>
                        <section v-if="item.observation && item.observation.length > 0" >
                            <h3>重点观察项：</h3>
                            <p>{{item.observation}}</p>
                        </section>
                        <section v-if="item.guide && item.guide.length > 0" >
                            <h3>指导方案：</h3>
                            <p>{{item.guide}}</p>
                        </section>
                        <section v-if="item.bringUp && item.bringUp.length > 0" >
                            <h3>能力拓展：</h3>
                            <p>{{item.bringUp}}</p>
                        </section>
                        <section v-if="item.parentManual && item.parentManual.length > 0" >
                            <h3>家长手册：</h3>
                            <p>{{item.parentManual}}</p>
                        </section>
                    </div>
                </el-collapse-item>

                <el-collapse-item title="测评项目详情" class="collapse-item" >

                    <div class="advise">
                        <div v-for="(item ,index) in detail.answerSheet" class="item">
                            <div v-if="titleVisible(index)" class="item-title-view">
                                <div class="item-title-top"></div>
                                <div class="item-title">{{item.dimensionName}}</div>
                            </div>
                            <div class="content-view">
                                <div>{{item.title}}({{item.month}}月龄题目标号{{item.indexOnPaper}})</div>
                                <image v-if="item.checked" class="item-check-yes"
                                       src="https://tuo51-teach-sh.oss-cn-shanghai.aliyuncs.com/public/images/assess-yes.png">
                                </image>
                                <image v-else class="item-check-no"
                                       src="https://tuo51-teach-sh.oss-cn-shanghai.aliyuncs.com/public/images/assess-no.png">
                                </image>
                            </div>
                            <div v-if="lineVisible(index)" class="suggest--exline"></div>
                        </div>
                    </div>
                </el-collapse-item>
            </el-collapse>
        </section>
        <div v-if="detail.failedQuestions && detail.failedQuestions.length < 1" class="advise">{{detail.tipStr}}</div>
    </div>
</div>
</body>
<script>
    Rem();
    var search=location.search;
    var evaluateRecordId  = '';
    if(search){
        var searchArr = search.substring(1,search.length).split('&');
        evaluateRecordId  = searchArr[0].split('=')[1]; //获取页面类型，0为投票，1为详情
    }
    // evaluateRecordId = "4028808a732906e601732c320c320000"
    let EchartsCavans;
    let EchartsCavansHeight;
    let EchartsCavansWeight;

    const host = window.location.host;
    let barColors = ['#D3B34D', '#FFD447','#FFC400', '#F1B146', '#FFA816','#f0f0f0']
    // let monthArray = [1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 18, 21, 24, 30, 36, 42, 48, 54, 60, 66, 72];
    // vue实例
    var app = new Vue({
        el:"#app",
        data:{
            detail: {
                bmi: {},
            },
            isKX:host.includes('xiaokangxuan')
        },
        mounted:function() {
            EchartsCavans = echarts.init(document.getElementById('echartsBox'));
            EchartsCavans.showLoading();
            EchartsCavansHeight = echarts.init(document.getElementById('echartsHeight'));
            EchartsCavansHeight.showLoading();
            EchartsCavansWeight = echarts.init(document.getElementById('echartsWeight'));
            EchartsCavansWeight.showLoading();
            this.getInitialData();
        },
        methods: {
            getInitialData(){
                let that = this;
                $.ajax({
                    type:"POST",
                    url:"/eapi/manager/detail",
                    data:{
                        evaluateRecordId:evaluateRecordId
                    },
                    headers:{
                        Accept: "application/json",
                    },
                    success:function(res){
                        if(res.code === "000000"){
                            console.log(res.data);
                            let data = res.data;
                            let scores_it = 0,scores_dev = 0;
                            if(data.dimensionScores){
                                let dimensionScores = data.dimensionScores;
                                dimensionScores.forEach(x => {
                                    x.score_it = parseFloat(x.score / 10).toFixed(1);
                                x.score_dev = parseFloat((x.score / data.month) * 10).toFixed(0);
                                if(x.dimensionId != '2c92848567977b50016797a129d909b4'){
                                    scores_it += x.score / 10;
                                    scores_dev += (x.score / data.month) * 10;
                                }
                            });
                                data.scores_it = (scores_it/(data.dimensionScores.length - 1)).toFixed(1);
                                data.scores_dev = (scores_dev/(data.dimensionScores.length - 1)).toFixed(0);
                                data.dimensionScores = dimensionScores;
                            }
                            let itValStr = '',tipStr = '您的宝宝心理行为发育良好，请继续保持。';
                            let score_temp = scores_dev/(data.dimensionScores.length - 1);
                            if(score_temp < 70){
                                itValStr = '低智能';
                                tipStr = '您的宝宝心理行为发育较同龄宝宝偏低，请您咨询老师提供相关提升方案。'
                            }else if(score_temp > 69 && score_temp < 85){
                                itValStr = '中下智能';
                                tipStr = '您的宝宝心理行为发育较同龄宝宝偏低，请您咨询老师提供相关提升方案。'
                            }else if(score_temp > 84 && score_temp < 115){
                                itValStr = '中等智能';
                            }else if(score_temp > 114 && score_temp <= 130){
                                itValStr = '中上智能';
                            }else{
                                itValStr = '高智能';
                            }
                            itValStr = getResult(data.scores_dev).str
                            data.itValStr = itValStr;
                            data.tipStr = tipStr;
                            that.detail = data;
                            echartsBarDraw(data.dimensionScores,data);
                            bmichartDraw(data.bmi,that.detail.height,that.detail.weight);
                        }
                    },
                    error:function(err){
                        console.log(err)
                    }
                });
            },

            titleVisible(index) {
                if (index > 0){
                    var now = this.detail.answerSheet[index].dimensionName;
                    var last = this.detail.answerSheet[index-1].dimensionName;
                    if (now === last){
                        return false;
                    }
                }
                return true;
            },

            lineVisible(index) {
                if (index < this.detail.answerSheet.length-1){
                    var now = this.detail.answerSheet[index].dimensionName;
                    var last = this.detail.answerSheet[index+1].dimensionName;
                    if (now === last){
                        return false;
                    }
                }
                return true;
            }
        },
    })

    function getResult(value){
        let color = '';
        let str = ''
        if(value < 70){
            color = barColors[0];
            str = '偏低'
        }else if(value < 85){
            color = barColors[1]
            str = '落后'
        }else if(value < 115){
            color = barColors[2]
            str = '正常'
        }else if(value < 130){
            color = barColors[3]
            str = '优秀'
        }else{
            color = barColors[4]
            str = '超常'
        }
        return {color,str}
    }

    function  echartsBarDraw(values,obj){
        const that = this;
        let label=[],devArr = [];
        let totalScore = 0;
        EchartsCavans.clear();
        EchartsCavans.showLoading();
        values.map(x=>{
            if(x.dimensionId === '2c92848567977b50016797a129d909b4'){
            return
        }
        totalScore += parseFloat(x.score_dev);
        label.push(x.dimensionName);
        devArr.push({
            value:parseFloat(x.score_dev),
            itemStyle:{
                color:getResult(x.score_dev).color
            },
            label:{
                show:true,
                position:'inside',
            }
        })
    })
        label.push('综合评价')
        let ava = totalScore/devArr.length;
        devArr.push({
            value:parseFloat(ava.toFixed(1)),
            itemStyle:{
                color:getResult(ava).color
            },
            label:{
                show:true,
                position:'inside',
            }
        })
        EchartsCavans.setOption({
                title:{
                    text:'发育商',
                    textStyle:{
                        fontSize:14,
                        color: '#50576a'
                    },
                    // subtext:'本次测评时间：'+ formatTimestamp(dateFromISO8601(obj.created),'date'),
                    left:'center',
                    top:0
                },
                color:barColors,
                tooltip: {
                    trigger: 'axis',
                    axisPointer : {            // 坐标轴指示器，坐标轴触发有效
                        type : 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
                    },
                    formatter:params=>{
                    let param = params[params.length - 1]
                    return '<h4 style="color:#fff">'+param.name+'</h4>'+param.marker + '<span>本次测评：'+param.data.value+'分（'+getResult(param.data.value).str+'）</span>'
                }
            },
            // legend: {
            //     top:56,
            //     left:0,
            //     right:0,
            //     padding:3,
            //     itemGap:6,
            //     data:['偏低(69分以下)','落后(70-84分)','正常(85-114分)','优秀(115-129分)','超常(130分以上)','本次测评'],
            //     textStyle:{
            //         color:'#a0a0a0',
            //         fontSize:11
            //     }
            // },
            grid: {
            top:40,
                left: '0',
                right: '0',
                bottom: '0',
                containLabel: true
        },
        xAxis: {
            type: 'category',
                // name:formatTimestamp(obj.created,'date'),
                // nameLocation:'start',
                // nameTextStyle:{
                //     color:'#a0a0a0',
                //     fontSize:11
                // },
                // boundaryGap: false,
                data: label,
                axisLabel:{
                rotate:45
            }
        },
        yAxis: {
            axisLabel:{
                show:true
            },
            type: 'value'
        },
        series: [
            {
                name:'偏低(69分以下)',
                type:'line',
                barWidth:30,
                data:new Array(label.length).fill(50),
                itemStyle:{
                    opacity:0
                },
                lineStyle:{
                    width:0
                },
                // markLine: {
                //     data: [
                //         {type: 'min', name: '平均值',label:{formatter:'偏低'}},
                //     ]
                // }
            },{
                name:'落后(70-84分)',
                type:'line',
                data:new Array(label.length).fill(70),
                itemStyle:{
                    opacity:0
                },
                lineStyle:{
                    width:0
                },
                // markLine: {
                //     data: [
                //         {type: 'min', name: '平均值',label:{formatter:'落后'}},
                //     ]
                // }
            },{
                name:'正常(85-114分)',
                type:'line',
                data:new Array(label.length).fill(85),
                itemStyle:{
                    opacity:0
                },
                lineStyle:{
                    width:0
                },
                // markLine: {
                //     data: [
                //         {type: 'min', name: '平均值',label:{formatter:'正常'}},
                //     ]
                // }
            },{
                name:'优秀(115-129分)',
                type:'line',
                data:new Array(label.length).fill(115),
                itemStyle:{
                    opacity:0
                },
                lineStyle:{
                    width:0
                },
                // markLine: {
                //     data: [
                //         {type: 'min', name: '平均值',label:{formatter:'优秀'}},
                //     ]
                // }
            },{
                name:'超常(130分以上)',
                type:'line',
                data:new Array(label.length).fill(130),
                itemStyle:{
                    opacity:0
                },
                lineStyle:{
                    width:0
                },
                // markLine: {
                //     data: [
                //         {type: 'min', name: '平均值',label:{formatter:'超常'}},
                //     ]
                // }
            },
            {
                name:'本次测评',
                type:'bar',
                zlevel :6,
                barWidth:30,
                data:devArr
            },
        ]
    })
        EchartsCavans.on('rendered',function(){
            EchartsCavans.hideLoading()
        })
    }

    function bmichartDraw(bmiData,height,weight){
        EchartsCavansHeight.clear();
        EchartsCavansHeight.showLoading();
        EchartsCavansWeight.clear();
        EchartsCavansWeight.showLoading();

        var beginIndex = 0;
        var endIndex = bmiData.monthBaseValuesV2.length - 1;

        var seriesArrayHeight = [];
        for (var index in bmiData.heightLineNamesV2) {
            var series = {
                name: '',
                type: 'line',
                data: [],
                markPoint: {},
            }
            series.name = bmiData.heightLineNamesV2[index];
            for (var value = beginIndex; value < endIndex+1; value++) {
                var item = [bmiData.monthBaseValuesV2[value],bmiData.heightLineValuesV2[index][value]]
                series.data.push(item) ;
            }
            seriesArrayHeight[index] = series;

            if (index === '0'){
                var point = {
                    symbolSize: 40, //标记大小
                    data:[
                        {xAxis: bmiData.actualMonth, yAxis: height},
                    ]
                };
                series.markPoint = point;
            }
        }
        console.log(seriesArrayHeight);

        var seriesArrayWeight = [];
        for (var index in bmiData.weightLineNamesV2) {
            var series = {
                name: '',
                type: 'line',
                data: [],
            }
            series.name = bmiData.weightLineNamesV2[index];
            for (var value = beginIndex; value < endIndex+1; value++) {
                var item = [bmiData.monthBaseValuesV2[value],bmiData.weightLineValuesV2[index][value]]
                series.data.push(item) ;
            }
            seriesArrayWeight[index] = series;

            if (index === '0'){
                var point = {
                    symbolSize: 40, //标记大小
                    data:[
                        {xAxis: bmiData.actualMonth, yAxis: weight},
                    ]
                };
                series.markPoint = point;
            }
        }

        heightOption = {
            title: {
                text:'身高曲线',
                textStyle:{
                    fontSize:14,
                    color: '#50576a'
                },
                left:'center',
                top:0
            },
            tooltip: {
                trigger: 'axis',
                axisPointer : {            // 坐标轴指示器，坐标轴触发有效
                    type : 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
                },
            },
            legend: {
                top:20,
                data: bmiData.heightLineNamesV2
            },
            grid: {
                top:70,
                left: '3%',
                right: '4%',
                bottom: '3%',
                containLabel: true
            },
            xAxis: {
                type: 'value',
                boundaryGap: false,
                data: bmiData.monthBaseValuesV2.slice(beginIndex,endIndex),
                min: bmiData.monthBaseValuesV2[beginIndex],
                max: bmiData.monthBaseValuesV2[endIndex],
                interval: 3,
                axisLabel:{
                    formatter: function (value, index) {
                        return value+'月';
                    },
                    rotate:45,
                    fontSize:10,
                },
            },
            yAxis: {
                type: 'value',
                splitNumber: 10,
                axisLabel:{
                    formatter: function (value, index) {
                        return value+'cm';
                    },
                    fontSize:10,
                },
                min: 50,
                max: 140,
            },
            series: seriesArrayHeight
        };

        weightOption = {
            title: {
                text:'体重曲线',
                textStyle:{
                    fontSize:14,
                    color: '#50576a'
                },
                left:'center',
                top:0
            },
            tooltip: {
                trigger: 'axis'
            },
            legend: {
                top:20,
                data: bmiData.weightLineNamesV2
            },
            grid: {
                top:70,
                left: '3%',
                right: '4%',
                bottom: '3%',
                containLabel: true
            },
            xAxis: {
                type: 'value',
                boundaryGap: false,
                data: bmiData.monthBaseValuesV2.slice(beginIndex,endIndex),
                min: bmiData.monthBaseValuesV2[beginIndex],
                max: bmiData.monthBaseValuesV2[endIndex],
                interval: 3,
                axisLabel:{
                    formatter: function (value, index) {
                        return value+'月';
                    },
                    rotate:45,
                    fontSize:10,
                },
            },
            yAxis: {
                type: 'value',
                splitNumber: 10,
                axisLabel:{
                    formatter: function (value, index) {
                        return value+'kg';
                    },
                    fontSize:10,
                },
                min: 2,
                max: 35,
            },
            series: seriesArrayWeight
        };

        EchartsCavansHeight.setOption(heightOption)
        EchartsCavansHeight.on('rendered',function(){
            EchartsCavansHeight.hideLoading()
        })

        EchartsCavansWeight.setOption(weightOption)
        EchartsCavansWeight.on('rendered',function(){
            EchartsCavansWeight.hideLoading()
        })
    }

</script>
</html>
